package com.linkoog.devtools.http.request.common.request_body;

import com.linkoog.devtools.http.request.common.RequestBody;
import com.linkoog.devtools.http.request.common.RequestBodyType;
import lombok.Getter;
import lombok.Setter;

@Setter @Getter
public class FileRequestBody implements RequestBody {

    private String paramName;
    private String fileName;
    private String filePath;

    public FileRequestBody() {
    }

    public FileRequestBody(String paramName, String fileName, String filePath) {
        this.paramName = paramName;
        this.fileName = fileName;
        this.filePath = filePath;
    }

    public static FileRequestBody of(String paramName, String fileName, String filePath) {
        return new FileRequestBody(paramName, fileName, filePath);
    }

    @Override
    public RequestBodyType bodyType() {
        return RequestBodyType.FILE;
    }

    @Override
    public String toString() {
        return "FileHttpBody{" +
                "paramName='" + paramName + '\'' +
                ", name='" + fileName + '\'' +
                ", value='" + filePath + '\'' +
                '}';
    }
}
